package com.xin.di.uav.applet.controller;

import com.xin.di.uav.applet.resp.GoodsResponse;
import com.xin.di.uav.applet.resp.ShopCartDetailsResponse;
import com.xin.di.uav.applet.service.HomePageService;
import com.xin.di.uav.common.utils.Rs;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/home-page/")
@RequiredArgsConstructor
@Tag(name = "首页接口", description = "首页接口")
public class HomePageController {

    @Autowired
    private HomePageService homePageService;

    @Tag(name = "首页接口", description = "首页接口")
    @GetMapping("first")
    public Rs<Void> getFirstPageInfo() {
        return null;
    }


    @Tag(name = "购物车接口", description = "购物车接口")
    @GetMapping("goods/shop-cart")
    public Rs<ShopCartDetailsResponse> shopCart(@RequestParam String productId) {
        return Rs.success(homePageService.shopCart(productId));
    }

    @Tag(name = "订单", description = "订单")
    @GetMapping("orders")
    public Rs<Void> orders() {
        return null;
    }

    @Tag(name = "我的", description = "我的")
    @GetMapping("mine")
    public Rs<Void> getMinePageInfo() {
        return null;
    }
}
